Merged
Conversation
Resolve conflicts in .gitignore, internal/cli/root.go, and internal/cli/status_page.go. Keep main's three-group goimports layout and newClientFn factory pattern; add PR's loadResolvedConfig helper (consumed by status_page_migrate.go) and reuse it from defaultNewClient to avoid duplicating flag-override logic. Keep PR's README expansion for the statuspage section; drop PR's docs/superpowers/ gitignore in favor of main's broader docs/ rule.
7 tasks
debidong
added a commit
that referenced
this pull request
Apr 20, 2026
Replaces the CLI-local raw-HTTP transport introduced by #1 with the flashduty-sdk v0.7.0 methods and routes the 4 migrate subcommands through the RunContext / runCommand pattern used by every other command. Changes: - Bump flashduty-sdk from v0.6.0 to v0.7.0 (adds status page migration methods). - Extend flashdutyClient interface with StartStatusPageMigration, StartStatusPageEmailSubscriberMigration, GetStatusPageMigrationStatus, CancelStatusPageMigration. - Add default mockClient stubs for the four new interface methods. - Rewrite internal/cli/status_page_migrate.go (~590 lines to ~280): delete statusPageMigrationAPI, statusPageMigrationService, the CLI-local migration transport, manual sanitization, and duplicate local types. Each cobra command now uses runCommand(cmd, args, func(ctx *RunContext) error {...}) and delegates to ctx.Client.*. Print helpers rewired from flagJSON / newPrinter() globals to ctx.JSON / ctx.Printer / ctx.Writer. - Rewrite internal/cli/status_page_migrate_test.go (387 lines to ~340): replace httptest-backed transport tests with newClientFn mock-swap tests using execCommand, matching the pattern established in command_test.go. One httptest-backed integration test per SDK method is not kept here because the flashduty-sdk repo owns wire-format tests now. Post-review fixes (independent reviews from go-reviewer + Codex): - Nil-guard mock methods so tests overriding a subset do not panic. - Assert "atlassian" substring in the unsupported-source error so the supported list cannot silently drift. - Emit both "command" (PR #1 schema) and "next_command" in cancel --json output to preserve the shipped JSON contract. - Move validateMigrationSource before runCommand so an invalid --from fails with the source error before any client/auth work, matching PR #1 ordering. Add two tests locking the ordering. Command output and JSON schemas remain compatible with PR #1. The file internal/cli/status_page_migrate.go is no longer an architectural outlier: 100% of the CLI now flows through ctx.Client. Verification: - go test -race -count=1 ./... green - go test -tags=e2e ./e2e/... green (24.4s) - gofmt, goimports, go vet clean - Coverage on ported commands: 80-100%.
5 tasks
debidong
added a commit
that referenced
this pull request
Apr 20, 2026
Replaces the CLI-local raw-HTTP transport introduced by #1 with the flashduty-sdk v0.7.0 methods and routes the 4 migrate subcommands through the RunContext / runCommand pattern used by every other command. Changes: - Bump flashduty-sdk from v0.6.0 to v0.7.0 (adds status page migration methods). - Extend flashdutyClient interface with StartStatusPageMigration, StartStatusPageEmailSubscriberMigration, GetStatusPageMigrationStatus, CancelStatusPageMigration. - Add default mockClient stubs for the four new interface methods. - Rewrite internal/cli/status_page_migrate.go (~590 lines to ~280): delete statusPageMigrationAPI, statusPageMigrationService, the CLI-local migration transport, manual sanitization, and duplicate local types. Each cobra command now uses runCommand(cmd, args, func(ctx *RunContext) error {...}) and delegates to ctx.Client.*. Print helpers rewired from flagJSON / newPrinter() globals to ctx.JSON / ctx.Printer / ctx.Writer. - Rewrite internal/cli/status_page_migrate_test.go (387 lines to ~340): replace httptest-backed transport tests with newClientFn mock-swap tests using execCommand, matching the pattern established in command_test.go. One httptest-backed integration test per SDK method is not kept here because the flashduty-sdk repo owns wire-format tests now. Post-review fixes (independent reviews from go-reviewer + Codex): - Nil-guard mock methods so tests overriding a subset do not panic. - Assert "atlassian" substring in the unsupported-source error so the supported list cannot silently drift. - Emit both "command" (PR #1 schema) and "next_command" in cancel --json output to preserve the shipped JSON contract. - Move validateMigrationSource before runCommand so an invalid --from fails with the source error before any client/auth work, matching PR #1 ordering. Add two tests locking the ordering. Command output and JSON schemas remain compatible with PR #1. The file internal/cli/status_page_migrate.go is no longer an architectural outlier: 100% of the CLI now flows through ctx.Client. Verification: - go test -race -count=1 ./... green - go test -tags=e2e ./e2e/... green (24.4s) - gofmt, goimports, go vet clean - Coverage on ported commands: 80-100%.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test Plan